﻿using System;
namespace Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000 {
    
    
    public partial class EhmaParinguVahemikTeenusega : global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.IEhmaParinguVahemikTeenusega {
        
        private EhmaParinguVahemikTeenusega.StartdType @__startd;
        
        private EhmaParinguVahemikTeenusega.EnddType @__endd;
        
        private string @__servicecode;
        
        public EhmaParinguVahemikTeenusega() {
        }
        
        /// <summary>
        /// All parameters
        /// </summary>
        public EhmaParinguVahemikTeenusega(EhmaParinguVahemikTeenusega.StartdType @startd, EhmaParinguVahemikTeenusega.EnddType @endd, string @servicecode) {
            this.@__startd = @startd;
            this.@__endd = @endd;
            this.@__servicecode = @servicecode;
        }
        
        /// <summary>
        /// Copy Constructor
        /// </summary>
        protected EhmaParinguVahemikTeenusega(IEhmaParinguVahemikTeenusega @ehmaParinguVahemikTeenusega) {
            this.@__startd = @ehmaParinguVahemikTeenusega.Startd;
            this.@__endd = @ehmaParinguVahemikTeenusega.Endd;
            this.@__servicecode = @ehmaParinguVahemikTeenusega.Servicecode;
        }
        
        public virtual EhmaParinguVahemikTeenusega.StartdType Startd {
            get {
                return this.@__startd;
            }
            set {
                this.@__startd = value;
            }
        }
        
        public virtual EhmaParinguVahemikTeenusega.EnddType Endd {
            get {
                return this.@__endd;
            }
            set {
                this.@__endd = value;
            }
        }
        
        public virtual string Servicecode {
            get {
                return this.@__servicecode;
            }
            set {
                this.@__servicecode = value;
            }
        }
        
        public class StartdType : global::Xtee.Core.Schema.XsdDate {
            
            public StartdType(System.DateTime value) : 
                    base(value) {
                this.SuuremVordneKui = Parse("2010-01-01");
                this.Validate();
            }
            
            public StartdType(string value) : 
                    base(value) {
                this.SuuremVordneKui = Parse("2010-01-01");
                this.Validate();
            }
            
            public StartdType() : 
                    base(new System.DateTime()) {
            }
            
            public static bool TryParse(string value, out StartdType result) {
                try {
                    result = new StartdType(value);
                    return true;
                }
                catch (System.Exception ) {
                    result = null;
                    return false;
                }
            }
            
            public static implicit operator DateTime (StartdType value) {
                return value.Value;
            }
            
            public static implicit operator StartdType (System.DateTime value) {
                return new StartdType(value);
            }
        }
        
        public class EnddType : global::Xtee.Core.Schema.XsdDate {
            
            public EnddType(System.DateTime value) : 
                    base(value) {
                this.SuuremVordneKui = Parse("2010-01-01");
                this.Validate();
            }
            
            public EnddType(string value) : 
                    base(value) {
                this.SuuremVordneKui = Parse("2010-01-01");
                this.Validate();
            }
            
            public EnddType() : 
                    base(new System.DateTime()) {
            }
            
            public static bool TryParse(string value, out EnddType result) {
                try {
                    result = new EnddType(value);
                    return true;
                }
                catch (System.Exception ) {
                    result = null;
                    return false;
                }
            }
            
            public static implicit operator DateTime (EnddType value) {
                return value.Value;
            }
            
            public static implicit operator EnddType (System.DateTime value) {
                return new EnddType(value);
            }
        }
    }
}
